{{!
  Copyright (c) HashiCorp, Inc.
  SPDX-License-Identifier: BUSL-1.1
~}}

<td data-test-task-group-name={{this.taskGroup.name}}>
  <LinkTo @route="jobs.job.task-group" @models={{array this.taskGroup.job this.taskGroup}} class="is-primary">
    {{this.taskGroup.name}}
  </LinkTo>
</td>
<td data-test-task-group-count class="nowrap">
  {{this.count}}
  {{#if this.taskGroup.scaling}}
  <div
    data-test-scale-controls
    class="button-bar is-shadowless is-text bumper-left {{if (or this.runningDeployment (cannot "scale job" namespace=this.namespace)) "tooltip multiline"}}"
    aria-label={{this.tooltipText}}>
      <button
        data-test-scale="decrement"
        role="button"
        aria-label="decrement"
        class="button is-xsmall is-light"
        disabled={{or this.isMinimum this.runningDeployment (cannot "scale job" namespace=this.namespace)}}
        onclick={{action "countDown"}}
        type="button">
        <Hds::Icon @name="minus" @isInline={{true}} />
      </button>
      <button
        data-test-scale-controls-increment
        data-test-scale="increment"
        role="button"
        aria-label="increment"
        class="button is-xsmall is-light"
        disabled={{or this.isMaximum this.runningDeployment (cannot "scale job" namespace=this.namespace)}}
        onclick={{action "countUp"}}
        type="button">
        <Hds::Icon @name="plus" @isInline={{true}} />
      </button>
    </div>
  {{/if}}
</td>
<td data-test-task-group-allocs>
  <div class="inline-chart"><AllocationStatusBar @allocationContainer={{this.taskGroup.summary}} @isNarrow={{true}} /></div>
</td>
<td data-test-task-group-volume>{{if this.taskGroup.volumes.length "Yes"}}</td>
<td data-test-task-group-cpu>{{format-scheduled-hertz this.taskGroup.reservedCPU}}</td>
<td data-test-task-group-mem>{{format-scheduled-bytes this.taskGroup.reservedMemory start="MiB"}}</td>
<td data-test-task-group-disk>{{format-scheduled-bytes this.taskGroup.reservedEphemeralDisk start="MiB"}}</td>
